package com.yh;

/**
 * @Auther: Liang
 * @Date: 2024/3/26 - 03 - 26 - 22:16
 * @Description: com.yh
 * @version: 1.0
 * 10、求出1到100之间所有奇数之和。
 */
public class H10 {
    public static void main(String[] args) {
        int num =0;
        for (int i = 1; i <= 100; i++) {
            if(i%2!=0){
                num+=i;
            }
        }
        System.out.println(num);
    }
}
